//
//  QpAllCityCollectionViewCell.m
//  Tour
//
//  Created by 才诗琦 on 16/3/11.
//  Copyright © 2016年 张中烨. All rights reserved.
//

#import "QpAllCityCollectionViewCell.h"

@implementation QpAllCityCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //图片
        self.photo = [[UIImageView alloc] init];
        [self.contentView addSubview:_photo];
        
        //去过的人数
        self.beenstr = [[UILabel alloc] init];
        [self.contentView addSubview:_beenstr];
        
        //代表景点
        self.representative = [[UILabel alloc] init];
        _representative.numberOfLines = 0;
        _representative.font = [UIFont systemFontOfSize:13];
        
        [self.contentView addSubview:_representative];
        
        
        
        //中文名字
        self.catename = [[UILabel alloc] init];
        _catename.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_catename];
        
        //英文名字
        self.catename_en = [[UILabel alloc] init];
        _catename_en.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_catename_en];
        
        
        
        
    }
    
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    _photo.frame = CGRectMake(0, 0, W, H - 60);
    _catename.frame = CGRectMake(5, _photo.frame.size.height, W - 10, 20);
    _representative.frame = CGRectMake(5, H - 40, W - 20, 40);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
